package cn.wolfcode.enums;

import lombok.Getter;

@Getter
public enum AppointmentEnum {
    PEND("待确认",0),
    PERFORM("履行中",1),
    CONSUME("消费中",2),
    FINISH("归档",3),
    FAILURE("废弃",4);
    private String name;
    private Integer value;

    AppointmentEnum(String name, Integer value) {
        this.name = name;
        this.value = value;
    }

    public static String findName(Integer value){
        AppointmentEnum[] values = AppointmentEnum.values();
        for (AppointmentEnum a:values){
            if (a.value.equals(value)){
                return a.name;
            }
        }
        return null;
    }

}
